#!/src/bin/perl -w
$filename = "corpus/amants.txt";
chomp($filename);
open (FileInput, $filename)||die "Can't open file";
open (FileOutput, '>amants_modifier_2.txt');
$i=1;
while ($line = <FileInput>) 
{
	@liste_mots = split(/ /,$line);
	foreach $mot (@liste_mots)
	{
		if($mot eq "un")
		{
			$mot = 1;
		}
		elsif($mot eq "deux")
		{
			$mot = 2;
		}
		print FileOutput " ".$mot;
	}
	print FileOutput "\n";
	$i = $i+1;

}
close(FileInput);
close(FileOutput); 